rake spec:plugin fails on rails 2.1
-
mrflip
Is it trying to run the files in the gen/auth'd/templates/spec directory?
Would you try renaming that directory to spec_t or foo or something and retrying?
-
mrflip
- State changed from new to open
-
Lar Van Der Jagt
Yes, it is trying to run the files in that directory. Renaming it seems to stop the restful_auth errors, but it looks like make_resourceful is acting up as well. Here is the pastie just in case it is useful
Are those files not meant to be run by rake spec:plugins? Are they just the generator files for the specs, and not actual specs?
-
mrflip
- State changed from open to hold
- Tag changed from template to generator, rspec, template
Exactly -- they are not meant to be run by the specs (being as they are .erb files)
This feels like a bug in either rspec or rails generators, not rest_auth. Do you feel like filing a bug or a patch with rspec?
The files are named "foo.rb", though they are technically "foo.rb.erb" files. However, the universal convention -- taking a quick tour of all the plugin generators I have -- is for foo.rb. This is the actual bug, but it is general across every generator.
The best concession to that reality would seem to me: have rake:rspec:plugin exclude any directory matching
generators/*/templates/.- If they don't seem excited about fixing it I'll rename the dir to spec_t or something.
-
Lar Van Der Jagt
So RSpec is just finding the generators for restful_auth specs and running them as actual plugin specs?
I will see what I can do about reporting this to the RSpec people or working up a patch.
-
mrflip
The error on make_resourceful looks different, but yeah -- it looks like for rest_auth it's running them as plugin specs. If there's a convention for renaming the dir, or something, then we'll move to it; let them know they can kick the bug back to here.
-
mrflip
The error on make_resourceful looks different, but yeah -- it looks like for rest_auth it's running them as plugin specs. If there's a convention for renaming the dir, or something, then we'll move to it; let them know they can kick the bug back to here.
-
Lar Van Der Jagt
I filed a ticket on rspec, and also found a temporary workaround. I added the following to the end of line 58 in the lib/tasks/rspec.rake file generated from rspec.
.exclude('vendor/plugins/**/templates/*')Seems better than modifying the plugin structure, since the task is actually part of my app.
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.